package com.lazi.june.common.sensitive;

import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * desc: 脱敏注解
 *
 * @author huliqian
 * @since 2025/8/22
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@JacksonAnnotationsInside
@JsonSerialize(using = SensitiveHandler.class)
public @interface Sensitive {

    /**
     * 脱敏策略
     *
     * @return SensitiveStrategy
     */
    SensitiveStrategy strategy();

    /**
     * 脱敏角色
     *
     * @return String[]
     */
    String[] roleKey();

    /**
     * 脱敏权限
     *
     * @return String[]
     */
    String[] perms();
}
